package cardgame.demo.event;

import cardgame.demo.logger.LogUtil;

public class LiJianCardEvent extends CardEvent {
    /**
     * 要离间的卡牌
     */
    private CardEvent targetCardEvent;

    public LiJianCardEvent() {
        this.cardName = "离间";
    }

    @Override
    void cardEffective() {
        LogUtil.println("%s的目标变更为了%s",targetCardEvent.getCardName(),this.targetId);
        targetCardEvent.targetId(this.getTargetId());
    }

    public CardEvent getTargetCardEvent() {
        return targetCardEvent;
    }

    public LiJianCardEvent targetCardEvent(CardEvent targetCardEvent) {
        this.targetCardEvent = targetCardEvent;
        return this;
    }
}
